﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; 
using AbstraX.ServerInterfaces;
using AbstraX.Bindings;
using CodeGenerationPipeline.Contracts;
using System.Diagnostics;
using AbstraX.Contracts;
using AbstraX;

namespace CodeGenerationPipeline
{
    [DebuggerDisplay(" { DebugInfo } ")]
    public class ElementBuild : IElementBuild
    {
        public IElement Element { get; set; }
        public List<IPropertyBinding> Bindings { get; internal set; }
        public OptionalDataContextOperation SupportedOperations { get; set; }
        public List<IOperation> RemoteCalls { get; set; }
        public List<NavigationItem> NavigationItems { get; internal set; }
        public bool IsBuilt { get; set; }
        public bool IsSaved { get; set; }
        public bool IsRootObject { get; set; }
        public string SuggestedNamespace { get; set; }

        public ElementBuild()
        {
            this.Bindings = new List<IPropertyBinding>();
            this.NavigationItems = new List<NavigationItem>();
            this.RemoteCalls = new List<IOperation>();
        }

        public string DebugInfo
        {
            get
            {
                return string.Format("Element='{0}'", this.Element.Name);
            }
        }
    }
}
